﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class D03_CreatCubePerSecond : MonoBehaviour
{
    private float nextTime = 0;

    public GameObject cubePrefab;
    private void Update()
    {
        if (Time.time > nextTime)
        {
            //生成
            Instantiate(cubePrefab, transform.position, Quaternion.identity);
            nextTime += 1;
        }
    }
}